<p class="text-right doc-link">Table <a target="_blank" ng-href="{{ wikiLink }}quest_template"><span class="glyphicon glyphicon-link" aria-hidden="true"></span>quest_template</a></p>

<div class="row">
  <div class="col-xs-6">
    <div class="borders">
      <h5>Emotions</h5>
      <div class="row">
        <div class="col-xs-3">
          <small>POIContinent</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.POIContinent">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'POIContinent', 'dbc/maps')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>POIx</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.POIx">
          </div>
        </div>
        <div class="col-xs-3">
          <small>POIy</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.POIy">
          </div>
        </div>
        <div class="col-xs-3">
          <small>POIPriority</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.POIPriority">
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-3">
          <small>DetailsEmote1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.Emote1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_details, 'Emote1', 'emote')">...</button>
            </div>
          </div>
          <small>DetailsEmote2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.Emote2">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_details, 'Emote2', 'emote')">...</button>
            </div>
          </div>
          <small>DetailsEmote3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.Emote3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_details, 'Emote3', 'emote')">...</button>
            </div>
          </div>
          <small>DetailsEmote4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.Emote4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_details, 'Emote4', 'emote')">...</button>
            </div>
          </div>
          <small>EmoteOnComplete</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_request_items.EmoteOnComplete">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_request_items, 'EmoteOnComplete', 'emote')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>DetailsEmoteDelay1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.EmoteDelay1">
          </div>
          <small>DetailsEmoteDelay2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.EmoteDelay2">
          </div>
          <small>DetailsEmoteDelay3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.EmoteDelay3">
          </div>
          <small>DetailsEmoteDelay4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_details.EmoteDelay4">
          </div>
          <small>EmoteOnIncomplete</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_request_items.EmoteOnIncomplete">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_request_items, 'EmoteOnIncomplete', 'emote')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>OfferRewardEmote1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.Emote1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_offer_reward, 'Emote1', 'emote')">...</button>
            </div>
          </div>
          <small>OfferRewardEmote2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.Emote2">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_offer_reward, 'Emote2', 'emote')">...</button>
            </div>
          </div>
          <small>OfferRewardEmote3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.Emote3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_offer_reward, 'Emote3', 'emote')">...</button>
            </div>
          </div>
          <small>OfferRewardEmote4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.Emote4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_offer_reward, 'Emote4', 'emote')">...</button>
            </div>
          </div>
          <div ng-show="version.name == '6.x'">
            <small>EmoteOnCompleteDelay</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_request_items.EmoteOnCompleteDelay">
          </div>
        </div>
        <div class="col-xs-3">
          <small>OfferRewEmDelay1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.EmoteDelay1">
          </div>
          <small>OfferRewEmDelay2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.EmoteDelay2">
          </div>
          <small>OfferRewEmDelay3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.EmoteDelay3">
          </div>
          <small>OfferRewEmDelay4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_offer_reward.EmoteDelay4">
          </div>
          <div ng-show="version.name == '6.x'">
            <small>EmoteOnIncompleteDelay</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_request_items.EmoteOnIncompleteDelay">
          </div>
        </div>
      </div>
    </div>
    <br>
    <div class="borders">
      <h5 class="text-left">Requirements to finish quest</h5>
      <div class="row">
        <div class="col-xs-3">
          <small>ItemDrop1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDrop1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'ItemDrop1', 'item')">...</button>
            </div>
          </div>
          <small>ItemDrop2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDrop2">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'ItemDrop2', 'item')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>ItemDrop3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDrop3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'ItemDrop3', 'item')">...</button>
            </div>
          </div>
          <small>ItemDrop4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDrop4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'ItemDrop4', 'item')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>ItemDropQuantity1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDropQuantity1">
          </div>
          <small>ItemDropQuantity2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDropQuantity2">
          </div>
        </div>
        <div class="col-xs-3">
          <small>ItemDropQuantity3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDropQuantity3">
          </div>
          <small>ItemDropQuantity4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.ItemDropQuantity4">
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="col-xs-6">
    <div class="borders">
      <h5>Quest Rewards</h5>
      <div class="row">
        <div class="col-xs-3">
          <small>RewardChoiceItem1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID1', 'item')">...</button>
            </div>
          </div>
          <small>RewardChoiceItem2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID2">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID2', 'item')">...</button>
            </div>
          </div>
          <small>RewardChoiceItem3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID3', 'item')">...</button>
            </div>
          </div>
          <small>RewardChoiceItem4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID4', 'item')">...</button>
            </div>
          </div>
          <small>RewardChoiceItem5</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID5">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID5', 'item')">...</button>
            </div>
          </div>
          <small>RewardChoiceItem6</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemID6">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardChoiceItemID6', 'item')">...</button>
            </div>
          </div>
          <small>RewardMailTemplateID</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template_addon.RewardMailTemplateID">
          </div>
          <small>RewardArenaPoints</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardArenaPoints">
          </div>
          <small>RewardFactionID1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionID1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RewardFactionID1', 'faction')">...</button>
            </div>
          </div>
          <small>RewardFactionID2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionID2">                 <div class="input-group-btn">
            <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RewardFactionID2', 'faction')">...</button>
            </div>
          </div>
          <small>RewardFactionID3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionID3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RewardFactionID3', 'faction')">...</button>
            </div>
          </div>
          <small>RewardFactionID4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionID4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RewardFactionID4', 'faction')">...</button>
            </div>
          </div>
          <small>RewardFactionID5</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionID5">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RewardFactionID5', 'faction')">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>ChoiceItemCount1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity1">
          </div>
          <small>ChoiceItemCount2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity2">
          </div>
          <small>ChoiceItemCount3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity3">
          </div>
          <small>ChoiceItemCount4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity4">
          </div>
          <small>ChoiceItemCount5</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity5">
          </div>
          <small>ChoiceItemCount6</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemQuantity6">
          </div>
          <small>RewardMailDelay</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template_addon.RewardMailDelay">
          </div>
          <small>RewardHonor</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardHonor">
          </div>
          <small>FactionValue1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionValue1">
          </div>
          <small>FactionValue2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionValue2">
          </div>
          <small>FactionValue3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionValue3">
          </div>
          <small>FactionValue4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionValue4">
          </div>
          <small>FactionValue5</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionValue5">
          </div>
        </div>
        <div class="col-xs-3">
          <small>RewardItem1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardItem1">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardItem1', 'item')">...</button>
            </div>
          </div>
          <small>RewardItem2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardItem2">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardItem2', 'item')">...</button>
            </div>
          </div>
          <small>RewardItem3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardItem3">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardItem3', 'item')">...</button>
            </div>
          </div>
          <small>RewardItem4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardItem4">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardItem4', 'item')">...</button>
            </div>
          </div>
          <small>RewardMoney</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardMoney">
          </div>
          <small>RewardBonusMoney</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardBonusMoney">
          </div>
          <small>RewardKillHonor</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardKillHonor">
          </div>
          <small>RewardTalents</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardTalents">
          </div>
          <small>RewardFactionOverride1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionOverride1">
          </div>
          <small>RewardFactionOverride2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionOverride2">
          </div>
          <small>RewardFactionOverride3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionOverride3">
          </div>
          <small>RewardFactionOverride4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionOverride4">
          </div>
          <small>RewardFactionOverride5</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionOverride5">
          </div>
        </div>
        <div class="col-xs-3">
          <small>RewardAmount1</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardAmount1">
          </div>
          <small>RewardAmount2</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardAmount2">
          </div>
          <small>RewardAmount3</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardAmount3">
          </div>
          <small>RewardAmount4</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardAmount4">
          </div>
          <small>RewardDisplaySpell</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardDisplaySpell">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardDisplaySpell', 'dbc/spells')">...</button>
            </div>
          </div>
          <small>RewardSpell</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardSpell">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RewardSpell', 'dbc/spells')">...</button>
            </div>
          </div>
          <small>RewardTitle</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardTitle">
          </div>
        </div>
      </div>
    </div>
    <div class="borders">
      <h5 style="margin-top: 18px; margin-bottom: 2px;">Other</h5>
      <div class="row">
        <div class="col-xs-3" ng-show="version.name == '3.3.5'">
          <small>Unknown0</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.Unknown0">
          </div>
        </div>
        <div class="col-xs-3">
          <small>SpecialFlags</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template_addon.SpecialFlags">
            <div class="input-group-btn">
              <button class="btn btn-info input-xs" ng-click="openFlagModal('partials/quest/modals/special-flags.html', new_quest_template_addon, 'SpecialFlags', 6)">...</button>
            </div>
          </div>
        </div>
        <div class="col-xs-3">
          <small>SuggestedGroupNum</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.SuggestedGroupNum">
          </div>
        </div>
        <div class="col-xs-3">
          <small>VerifiedBuild</small>
          <div class="input-group">
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.VerifiedBuild">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<br>
<div class="row">
  <div class="col-xs-2 pull-right">
    <button class="btn btn-success" ng-click="openScriptTab()">UPDATE SQL Script</button>
  </div>
  <div class="col-xs-2 pull-right">
    <button class="btn btn-primary" ng-click="openFullScriptModal([new_quest_template, new_quest_template_addon, new_quest_details, new_quest_request_items, new_quest_offer_reward], ['quest_template', 'quest_template_addon', 'quest_details', 'quest_request_items', 'quest_offer_reward'], ['ID', 'ID', 'ID', 'ID', 'ID'])">FULL Quest SQL</button>
  </div>
</div>
<br>
